package com.demo.service.impl;

import com.demo.mapper.CompetenceMapper;
import com.demo.pojo.Competence;
import com.demo.service.CompetenceService;
import com.demo.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author： Administrator
 * @date: 21/05/12 15:32
 * 描述：
 */
@Service
public class CompetenceServiceImpl implements CompetenceService {
    @Autowired
    CompetenceMapper competenceMapper;

    @Override
    public List<Competence> list() {
        return competenceMapper.list();
    }

    @Override
    public int add(Competence competence) {
        return competenceMapper.insertSelective(competence);
    }

    @Override
    public int del(String no) {
        return -99;
    }

    @Override
    public int del(Integer id) {
        return competenceMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int update(Competence competence) {
        return competenceMapper.updateByPrimaryKeySelective(competence);
    }

    @Override
    public Page<Competence> page(Competence competence, int pageNo, int pageSize) {
        return null;
    }
}
